package com.example.testservice;

import android.app.Service;
import android.content.ComponentName;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.util.Log;

public class MyService extends Service {

	private MyBinder binder = new MyBinder();

	public class MyBinder extends Binder {
		MyService getService() {
			return MyService.this;
		}
	}

	public MyService() {
		Log.i("gjf", "MyService++++++++++");
	}

	@Override
	public void onCreate() {
		Log.i("gjf", "onCreate++++++++++");
		super.onCreate();
	}

	@Override
	public int onStartCommand(Intent intent, int flags, int startId) {
		Log.i("gjf", "onStartCommand++++++++++");
		return super.onStartCommand(intent, flags, startId);
	}

	@Override
	public IBinder onBind(Intent arg0) {
		Log.i("gjf", "onBind++++++++++");
		return binder;
	}

	@Override
	public boolean onUnbind(Intent intent) {
		Log.i("gjf", "onUnbind++++++++++");
		return super.onUnbind(intent);
	}

	@Override
	public void onDestroy() {
		Log.i("gjf", "onDestroy++++++++++");
		super.onDestroy();
	}

}
